package com.jic.market.api.manage;

import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.market.request.manager.overlay.*;
import com.jic.market.response.manager.overlay.OverlayGroupQueryResponse;
import com.jic.market.response.manager.overlay.OverlayInfoQueryResponse;
import com.jic.market.response.manager.overlay.OverlayPromotionResponse;
import com.jic.market.response.manager.overlay.QueryPagePromotionResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: gaolanyu
 * @date: 2020-03-19
 * @remark: 叠加api
 */
@FeignClient(name = "jic-market", path = "/overlay")
public interface OverlayApi {

    @PostMapping("/query-page-promotion")
    RestResult<PageResult<QueryPagePromotionResponse>> queryPagePromotion(@RequestBody QueryPagePromotionRequest overlayAddRuleGroupRequest);

    @PostMapping("/check-prom-type")
    RestResult<Boolean> checkPromType(@RequestBody OverlayPromotionInfoCheckRequest overlayPromotionInfoCheckRequest);

    @PostMapping("/add-overlay-rule")
    RestResult<String> addOverlayGroup(@RequestBody OverlayAddRuleGroupRequest overlayAddRuleGroupRequest);

    @PostMapping("/close-overlay")
    RestResult<Boolean> closeOverlay(@RequestBody OverlayBaseRequest overlayBaseRequest);

    @PostMapping("/delete-overlay")
    RestResult<Boolean> deleteOverlay(@RequestBody OverlayBaseRequest overlayBaseRequest);

    @PostMapping("/query-overlay-info-page")
    RestResult<PageResult<OverlayInfoQueryResponse>> queryOverlayInfo(@RequestBody OverlayInfoQueryRequest overlayInfoQueryRequest);

    @PostMapping("/query-overlay-group")
    RestResult<OverlayGroupQueryResponse> queryOverlayGroupInfo(@RequestBody OverlayGroupInfoQueryRequest overlayGroupInfoQueryRequest);

    @PostMapping("/set-full-amount-reduce")
    RestResult<Boolean> setOverlayGroup(@RequestBody OverlayGroupUpdateRequet overlayGroupUpdateRequet);

    @PostMapping("/add-overlay-group-promotion")
    RestResult<Boolean> addOverlayGroupPromotionInfo(@RequestBody OverlayGroupAddPromotionRequest overlayGroupAddPromotionRequest);

    @PostMapping("/delete-overlay-group-promotion")
    RestResult<Boolean> deleteOverlayGroupPromotionInfo(@RequestBody OverlayGroupDeletePromotionRequest overlayGroupDeletePromotionRequest);

}
